package cn.itcast.nems.common.enumeration;

import cn.itcast.ic.common.bean.BizError;
import cn.itcast.ic.common.bean.BizHttpStatus;

@Deprecated
public class CustomBizError extends BizError {
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 835243103917792643L;
    
    public final static CustomBizError PARAM_EMPTY = new CustomBizError(BizHttpStatus.SC_BAD_REQUEST, "PARAM_EMPTY", "参数为空");
    public final static CustomBizError NOT_FUND = new CustomBizError(BizHttpStatus.SC_BAD_REQUEST, "NOT_FUND", "数据不存在");
    public final static CustomBizError DATA_TYPE_ERROR = new CustomBizError(BizHttpStatus.SC_BAD_REQUEST, "DATA_TYPE_ERROR", "数据类型错误");
    
    public final static CustomBizError PRODUCT_PRICE_MISMATCH = new CustomBizError(BizHttpStatus.SC_BAD_REQUEST, "PRODUCT_PRICE_MISMATCH", "产品价格不正确，可能价格已更新，请重新选择产品后提交。");
    public final static CustomBizError PRODUCT_MISMATCH = new CustomBizError(BizHttpStatus.SC_BAD_REQUEST, "PRODUCT_MISMATCH", "产品价格不正确，可能价格已更新，请重新选择产品后提交。");
    
    public CustomBizError(int status, String code, String message) {
        super(status, code, message);
    }
    
    public  static CustomBizError message(BizError customBizError , String message ) {
        return new CustomBizError(customBizError.getStatus(),customBizError.getCode() ,message) ;
    }

}
